﻿function showHelpAbout() {
    var logoimageinfo = new Ext.BoxComponent({
        id: 'imglogoinfo',
        xtype: 'box',
        width: 300,
        height: 40,
        style: '',
        autoEl: {
            tag: 'img',
            src: ROOT_IMG_URL+'tracker-system.png'
        }
    });

    var companyInfoText = _CompanyInfo_Info;

    var companyInfoPanelText = new Ext.Panel({
        width: 300,
        height: 150,
        border: false,
        bodyStyle: 'font-size:12px;text-align:left;padding-left:10px;font-family:tahoma',
        html: companyInfoText
    });

    var panelcompanyinfo = new Ext.Panel({
        width: 300,
        height: 200,
        //renderTo: 'login',
        bodyStyle: 'padding-top:0px',
        border: false,
        //layout : 'table',
        //layoutConfig:{columns:2},
        labelAlign: 'right',
        items: [logoimageinfo, companyInfoPanelText]
    });

    var aboutWindows = new Ext.Window({
        title: _TrackerMain_Help_About,
        layout: 'fit',
        height: 250,
        width: 330,
        items: panelcompanyinfo
    });

    aboutWindows.show();
}
function showHelpDocument() {

    var documentfields = ["DocumentID", "DocumentName", "DocumentLink", "CreateDateString", "Version"];
    var documentstore = new Ext.data.Store({
        proxy: new Ext.data.HttpProxy({
            url: "HandlerGetAllDocument",
            method: "POST"
        }),
        reader: new Ext.data.JsonReader({
            fields: documentfields,
            root: "data",
            totalProperty: "totalCount"
        }),
        autoLoad: true
    });

    var grid = new Ext.grid.GridPanel({
        store: documentstore,
        columns: [
                { header: _DocumentGuideResource_Name, width: 250, sortable: true, menuDisabled: true, dataIndex: 'DocumentName' },
                { header: _DocumentGuideResource_CreateDate, width: 100, sortable: true, menuDisabled: true, dataIndex: 'CreateDateString' },
                { header: _DocumentGuideResource_Version, width: 90, sortable: true, menuDisabled: true, dataIndex: 'Version' },
                { header: _DocumentGuideResource_Link, width: 80, sortable: true, menuDisabled: true, dataIndex: 'DocumentLink', renderer: function (DocumentLink, myDontKnow, myRecord) { return '<a target="_blank" href="' + DocumentLink + '">Download</a>'; }
                 }
        //                ,{ header: _DriverResource_FirstLicense, width: 150, sortable: true, menuDisabled: true, dataIndex: 'driver_license_model1' }
            ],
        width: 530,
        height: 300
    });

    var documentwindow = new Ext.Window({
        title: _TrackerMain_Help_Document,
        layout: 'fit',
        height: 320,
        width: 550,
        items: grid,
        constrain: true
    });

    documentwindow.show();
}